Retrieve the saved value of PHYRegister 0x6B
- Take bits 0-7 of the value
- Take bits 8-15 of the value and shift right by 8 bits
- If bit 7 is set in either value, subtract 0x100 from the value (results in signed 8 bit values)
Find the BB PGA value from the table below using the offsets passed in, mutiply that by the previous values from PHYRegister 0x6B
- Add 0x20 to each value, then shift the result right by 6
- Clamp both results between -15 and 15
- If the PHY Revision is 5 or less
- Add one to each value, then right shift by 1
- Clamp both results between -8 and 7
- If either value is below 0, add 0x10
- Left shift the value that came from bits 8-15 by 4 and mask with 0xF0, then bitwise OR with the other value masked with 0xF, this is the DC Bias
- Otherwise
- If either value is below 0, add 0x40
- Left shift the value that came from bits 8-15 by 6 and mask with 0xFC0, then bitwise OR with the other value masked with 0x3F, this is the DC Bias
BB PGA Lookup Table
Offsets |
0 |
1 |
2 |
3 |
4 |
5 |
0 |
0x00 |
0x77 |
0x56 |
0x3F |
0x2E |
0x22 |
1 |
0x00 |
0x7E |
0x5B |
0x42 |
0x31 |
0x24 |
2 |
0x00 |
0x86 |
0x61 |
0x46 |
0x33 |
0x26 |
3 |
0x00 |
0x8E |
0x67 |
0x4A |
0x36 |
0x28 |
4 |
0x00 |
0x96 |
0x6D |
0x4F |
0x3A |
0x2B |
5 |
0x00 |
0x9F |
0x73 |
0x53 |
0x3D |
0x2D |
6 |
0x00 |
0xA8 |
0x7A |
0x58 |
0x41 |
0x30 |
7 |
0x00 |
0xB2 |
0x81 |
0x5E |
0x45 |
0x33 |
8 |
0x00 |
0xBD |
0x89 |
0x63 |
0x49 |
0x36 |
9 |
0x00 |
0xC8 |
0x91 |
0x69 |
0x4D |
0x39 |
10 |
0x00 |
0xD4 |
0x9A |
0x6F |
0x52 |
0x3C |
11 |
0x00 |
0xE0 |
0xA3 |
0x76 |
0x56 |
0x40 |